home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1998 / MacHack 1998.toast / The Hacks! / Spotlight Hack / source / main.h < prev   
Encoding:
Text File  |  1998-06-21  |  1.1 KB  |  51 lines  |  [TEXT/CWIE]

  1. // main.h
  2.  
  3. #pragma once
  4.  
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif
  8.  
  9. typedef struct SpotlightPrefs {
  10.     EventModifiers activateModifiers, disableModifiers;
  11.     unsigned short spotlightSize;
  12.     Boolean switchToFinder, hideApps, oneLayer;
  13.     
  14.     char reserved[100];
  15. } SpotlightPrefs;
  16.  
  17. enum {
  18.     uppShowSpotlightInfo = kThinkCStackBased
  19.         | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(Point)))
  20.         | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(Boolean))),
  21.     
  22.     uppMakeSpotlightInfo = kThinkCStackBased
  23. };
  24.  
  25. typedef struct SpotlightGlobals {
  26. // spotlight tracking globals
  27.     Boolean active, activating;    
  28.     RgnHandle spotlightRgn, oldlightRgn, newlightRgn;
  29.     RgnHandle scratchRgn;
  30.     Point lightCenter;
  31.  
  32. // misc globals
  33.     SpotlightPrefs prefs;
  34.     ProcessSerialNumber finderPSN;
  35.     WindowPtr lastModalDialog;
  36.  
  37. // globals required by other code fragments
  38.     Boolean deactivating;
  39.     DragDrawingUPP theirDrawUPP, myDrawUPP;
  40.     UniversalProcPtr dragDispatchAddr;
  41.     UniversalProcPtr showSpotlightUPP, makeSpotlightUPP;
  42. } SpotlightGlobals;
  43.  
  44. extern SpotlightGlobals glob;
  45.  
  46. void MoveSpotlightOffscreen(void);
  47. void MakeSpotlightRgn(void);
  48.  
  49. #ifdef __cplusplus
  50. }
  51. #endif